package designmode.design2;

/**
 * 动物
 *
 * @author lfg
 * @version 1.0
 */
public class Animal {

    private double runSpeed;

    public double getRunSpeed() {
        return runSpeed;
    }

    /**
     * 设置速度
     */
    public void setRunSpeed(double runSpeed) {
        this.runSpeed = runSpeed;
    }

    /**
     * 需要跑多久
     */
    public double getRunTime(double distance) {
        return distance / runSpeed;
    }

}
